﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../lib/html5shiv.js"></script>
    <script type="text/javascript" src="../../lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../css/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/css/style.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="../../lib/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>工人信息管理</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 用户管理
    <span class="c-gray en">&gt;</span> 工人信息管理
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>

<div class="page-container">
    <form class="form-horizontal ">

        <div class=" form-group col-md-4 mb-15">
            <label class="form-label col-md-4 ">姓名：</label>
            <div class="formControls col-md-8">
                <input type="text" class="input-text" placeholder="姓名">
            </div>
        </div>
        <div class="form-group col-md-4 mb-15">
            <label class="form-label col-md-4">电话：</label>
            <div class="formControls col-md-8">
                <input type="text" class="input-text" placeholder="电话">
            </div>
        </div>

        <div class=" form-group col-md-4 mb-15">
            <label class="form-label col-md-4">居住地：</label>
            <div class="formControls  col-md-8">
                 <span class="select-box">
                    <select class="select" size="1" name="demo1">
                        <option value="" selected>玄武区</option>
                        <option value="1">雨花台区</option>
                        <option value="2">秦淮区</option>
                        <option value="3">白下</option>
                    </select>
                 </span>
            </div>
        </div>

        <div class=" form-group col-md-4 mb-15">
            <label class="form-label col-md-4">认证状态：</label>
            <div class="formControls  col-md-8">
                 <span class="select-box">
                    <select class="select" size="1" name="demo1">
                        <option value="" selected>实名认证</option>
                        <option value="1">保证金认证</option>
                        <option value="2">官方认证</option>
                    </select>
                 </span>
            </div>
        </div>

        <div class=" form-group col-md-4 mb-15">
            <label class="form-label col-md-4">工种：</label>
            <div class="formControls  col-md-8">
                 <span class="select-box">
                    <select class="select" size="1" name="demo1">
                        <option value="" selected>木工</option>
                        <option value="1">瓦工</option>
                    </select>
                 </span>
            </div>
        </div>
        <div class=" form-group col-md-4 mb-15">
            <label class="form-label col-md-4">注册时间：</label>
            <div class="formControls  col-md-8">
                <input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })"
                       id="datemin" class="input-text Wdate" style="width:150px;">
                <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"
                       id="datemax" class="input-text Wdate" style="width:150px;">
            </div>
        </div>
        <div class=" form-group col-md-12 mb-50 text-c">
            <button type="submit" class="btn btn-success radius ml-50" id="" name=""><i
                    class="Hui-iconfont">&#xe665;</i> 搜用户
            </button>
            <button type="submit" class="btn btn-primary  radius ml-50" id="" name=""><i
                    class="Hui-iconfont">&#xe641;</i> 导出
            </button>
        </div>
    </form>
    <div class="pt-50">
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="25">序号</th>
                <th width="100">用户ID</th>
                <th width="100">姓名</th>
                <th width="90">电话</th>
                <th width="90">角色</th>
                <th width="150">认证状态</th>
                <th width="130">加入时间</th>
                <th width="70">状态</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c">
                <td>1</td>
                <td>YH20170802001</td>
                <td>张三</td>
                <td>13000000000</td>
                <td>木工</td>
                <td>实名认证</td>
                <td>2017/08/02</td>

                <td class="td-status">
                    <span class="label label-success radius">正常</span>
                </td>
                <td class="td-manage">
                    <a style="text-decoration:none" onClick="member_stop(this,'10001')"
                       href="javascript:;" title="停用">
                        <i class="Hui-iconfont">&#xe631;</i>停用</a>
                    <a href="javascript:;" onClick="user_detail('用户详情','member-detail1.html','10001')"><i class="Hui-iconfont">&#xe725;</i>查看</a>
                </td>
            </tr>
            <tr class="text-c">
                <td>1</td>
                <td>YH20170802001</td>
                <td>张三</td>
                <td>13000000000</td>
                <td>木工</td>
                <td>实名认证</td>
                <td>2017/08/02</td>

                <td class="td-status">
                    <span class="label label-defaunt radius">冻结中</span>
                </td>
                <td class="td-manage">
                    <a style="text-decoration:none" onClick="member_start(this,'10001')"
                       href="javascript:;" title="启用">
                        <i class="Hui-iconfont">&#xe615;</i>启用</a>
                    <a href="../index.html"><i class="Hui-iconfont">&#xe725;</i>查看</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../../js/js/H-ui.min.js"></script>
<script type="text/javascript" src="../../js/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="../../lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="../../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../../lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">

    $(function () {
        $('.table-sort').dataTable({
            "bFilter": false,//开关，是否启用客户端过滤器
            "bLengthChange": false,//开关，是否下拉自定义分页大小
            "bSort": false//开关 表格
        });

    });
    function user_detail(title,url,id){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }

    /*用户-停用*/
    function member_stop(obj, id) {
        layer.confirm('确认要停用吗？', function (index) {
            $.ajax({
                type: 'POST',
                url: '',
                dataType: 'json',
                success: function (data) {
                    $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_start(this,id)" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe6e1;</i></a>');
                    $(obj).parents("tr").find(".td-status").html('<span class="label label-defaunt radius">已停用</span>');
                    $(obj).remove();
                    layer.msg('已停用!', {icon: 5, time: 1000});
                },
                error: function (data) {
                    console.log(data.msg);
                },
            });
        });
    }

    /*用户-启用*/
    function member_start(obj, id) {
        layer.confirm('确认要启用吗？', function (index) {
            $.ajax({
                type: 'POST',
                url: '',
                dataType: 'json',
                success: function (data) {
                    $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_stop(this,id)" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>');
                    $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
                    $(obj).remove();
                    layer.msg('已启用!', {icon: 6, time: 1000});
                },
                error: function (data) {
                    console.log(data.msg);
                },
            });
        });
    }


</script>
</body>
</html>